package com.yl.project.lvyou.likes.service.impl;

import java.util.List;
import com.yl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yl.project.lvyou.likes.mapper.ScenicCommentLikesMapper;
import com.yl.project.lvyou.likes.domain.ScenicCommentLikes;
import com.yl.project.lvyou.likes.service.IScenicCommentLikesService;
import com.yl.common.utils.text.Convert;
import com.yl.framework.config.BaseService;

/**
 * 评论点赞Service业务层处理
 * 
 * @author yl
 * @date 2025-03-14
 */
@Service
public class ScenicCommentLikesServiceImpl extends BaseService<ScenicCommentLikes> implements IScenicCommentLikesService 
{
    @Autowired
    private ScenicCommentLikesMapper scenicCommentLikesMapper;

    /**
     * 查询评论点赞
     * 
     * @param id 评论点赞ID
     * @return 评论点赞
     */
    @Override
    public ScenicCommentLikes selectScenicCommentLikesById(Long id)
    {
        return scenicCommentLikesMapper.selectScenicCommentLikesById(id);
    }

    /**
     * 查询评论点赞列表
     * 
     * @param scenicCommentLikes 评论点赞
     * @return 评论点赞
     */
    @Override
    public List<ScenicCommentLikes> selectScenicCommentLikesList(ScenicCommentLikes scenicCommentLikes)
    {
        return scenicCommentLikesMapper.selectScenicCommentLikesList(scenicCommentLikes);
    }

    /**
     * 新增评论点赞
     * 
     * @param scenicCommentLikes 评论点赞
     * @return 结果
     */
    @Override
    public int insertScenicCommentLikes(ScenicCommentLikes scenicCommentLikes)
    {
        scenicCommentLikes.setCreateTime(DateUtils.getNowDate());
        return scenicCommentLikesMapper.insertScenicCommentLikes(scenicCommentLikes);
    }

    /**
     * 修改评论点赞
     * 
     * @param scenicCommentLikes 评论点赞
     * @return 结果
     */
    @Override
    public int updateScenicCommentLikes(ScenicCommentLikes scenicCommentLikes)
    {
        return scenicCommentLikesMapper.updateScenicCommentLikes(scenicCommentLikes);
    }

    /**
     * 删除评论点赞对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteScenicCommentLikesByIds(String ids)
    {
        return scenicCommentLikesMapper.deleteScenicCommentLikesByIds(Convert.toStrArray(ids));
    }

    @Override
    public int deleteLike(ScenicCommentLikes scenicCommentLikes) {
        return scenicCommentLikesMapper.deleteLike(scenicCommentLikes);
    }



}
